package com.smartfarm.Zerenlian;

import com.smartfarm.Zerenlian.SafetyHandler;

//责任链模式相关
public class ObstacleHandler extends SafetyHandler {
    @Override
    public void handleRequest(String event) {
        if (event.contains("障碍物")) {
            System.out.println("障碍物处理器: 执行紧急避障操作");
        } else if (nextHandler != null) {
            nextHandler.handleRequest(event);
        }
    }
}